package zj.xinxin.business.business.security.converter;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import zj.xinxin.api.moudle.security.dto.ConsumerInfoDto;
import zj.xinxin.api.moudle.security.entity.ConsumerEntity;
import zj.xinxin.api.moudle.security.vo.UserInfoUpdateVo;
import zj.xinxin.api.moudle.security.vo.UserInfoVo;

/**
 * @author junzhou
 * @date 2022/3/26 23:04
 * @since 1.8
 */
@Mapper(componentModel = "spring")
public interface ConsumerConverter {

    ConsumerConverter INSTANCE = Mappers.getMapper(ConsumerConverter.class);

    ConsumerEntity toEntity(UserInfoVo userInfo);

    ConsumerEntity toEntity(UserInfoUpdateVo userInfo);

    ConsumerInfoDto toDto(ConsumerEntity entity);
}
